package com.rongshu.view.userInfo.presenter;

import android.content.Context;

import com.rongshu.api.RetorfitService;
import com.rongshu.view.base.mvp.BasePresenter;
import com.rongshu.view.userInfo.entity.AboutUs;
import com.rongshu.view.userInfo.iview.AboutUsView;

import rx.Subscriber;

public class AboutUsPresenter extends BasePresenter<AboutUsView> {

    public AboutUsPresenter(Context context) {
        super(context);
    }

    /**
     * 关于
     */
    public void getAbout(int rnd, String sign) {
        RetorfitService.getAbout(rnd, sign)
                .subscribe(new Subscriber<AboutUs>() {
                    @Override
                    public void onCompleted() {

                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onNext(AboutUs aboutUs) {
                        if (getView() != null) {
                            getView().onAboutUs(aboutUs);
                        }
                    }
                });
    }
}
